import { useSelector } from "react-redux";
import { StateType } from "../store";
import { UserStateType } from "../store/userReducer";

function useGetUserInfo() {
  const { username, naLable } = useSelector<StateType>(
    (state) => state.user,
  ) as UserStateType;

  return {
    username,
    naLable,
  };
}

export default useGetUserInfo;
